package com.wall.springbootinit.service;

import com.wall.springbootinit.model.dto.user.RetrievePasswordDTO;
import com.wall.springbootinit.model.dto.user.UserLoginDTO;
import com.wall.springbootinit.model.entity.User;
import com.baomidou.mybatisplus.extension.service.IService;
import com.wall.springbootinit.model.vo.EmailCaptchaVo;
import com.wall.springbootinit.model.vo.UserVo;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
* @author 33932
* @description 针对表【sys_user(用户表)】的数据库操作Service
* @createDate 2024-05-19 15:27:39
*/
public interface UserService extends IService<User> {

    /**
     * 登录
     * @param userLoginDTO 登录信息
     * @return 结果
     */
    String login(UserLoginDTO userLoginDTO);

    /**
     * 获取验证码
     * @param email 邮箱
     * @return 结果
     */
    EmailCaptchaVo getCaptcha(String email, HttpServletRequest request);

    /**
     * 重置密码
     * @param retrievePasswordDTO 重置密码信息
     * @return 结果
     */
    boolean retrievePassword(RetrievePasswordDTO retrievePasswordDTO);

    /**
     * 获取当前用户
     * @param loginId 登录id
     * @return 结果
     */
    UserVo getCurrentUser(Object loginId);
}
